<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="lib/jquery-3.4.1.js"></script>
</head>
<body>
    <!-- 不受同源网络限制的有
        link-src
        img-src
        script-src
    -->
    <script>
        /* 
        客户端跨域 
        1.jsonp跨域
        2.script  因为script标签不受同源策略的限制
        */
        var url="http://douban.uieee.com/v2/movie/top250";
        // $.ajax({
        //     url,
        //     type:"get",
        //     dataType:"jsonp",
        //     success:res=>{
        //         console.log(res)
        //     }
        // })
        var script =document.createElement("script");
        script.src=url+"?callback=handleData";
        document.body.append(script);
        function handleData(res){
            console.log(res)
        }
        
        
        
        </script>
</body>
</html>